package com.andnnl.map;

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * Created by chenss on 2022/6/10.
 */
public class MapIterDelTest {
    public static void main(String[] args) {
        Map<String, String> map = new ConcurrentHashMap<String, String>();
        map.put("2", "2");
        map.put("1", "1");
        for (Map.Entry<String, String> entry : map.entrySet()) {
            map.clear();
            System.out.println(entry.getKey());
        }
        System.out.println(map);


    }
}
